player setVariable ["selections", []];
player setVariable ["gethit", []];
player addEventHandler [
	"HandleDamage",	{
		if (_this select 1 == "") then
		{
			_selections = player getVariable ["selections", []];
			_gethit = player getVariable ["gethit", []];
			_selection = _this select 1;
			if !(_selection in _selections) then
			{
				_selections set [count _selections, _selection];
				_gethit set [count _gethit, 0];
			};    
			_i = _selections find _selection;
			_olddamage = _gethit select _i;
			_damage = _olddamage + ((_this select 2) - _olddamage) * 0.25;
			_gethit set [_i, _damage];
			_damage;
		};
	}
];
player addEventHandler [
	"Hit", {
		true call player_updateHUD;
	}
];

player addEventHandler [
	"respawn", {
		true execVM "dialog\create_hud.sqf";
		player setVariable ["selections", []];
		player setVariable ["gethit", []];
		true call player_updateHUD;
		[] execVM "client\playerspawn.sqf";
	}
];